-- GENERATED SPELL FOR [Emberstrife] --


function spell0_10321(pUnit, Event) --@Cleave,n/a--
pUnit:FullCastSpellOnTarget(40504,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_10321', 624, 1)
end

function spell1_10321(pUnit, Event) --@Flame Breath,n/a--
pUnit:FullCastSpellOnTarget(9573,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_10321', 2000, 1)
end

function spell2_10321(pUnit, Event) --@Flames of the Black Flight,n/a--
pUnit:FullCastSpellOnTarget(16054,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_10321', 585, 1)
end

function spell3_10321(pUnit, Event) --@Frenzy,Self--
pUnit:FullCastSpellOnTarget(8269,pUnit)
pUnit:RegisterEvent('Sorts_10321', 519, 1)
end

function Sorts_10321(pUnit, Event)
local choix_sorts_10321 = math.random(0, 3)
if choix_sorts_10321 == 0 then
pUnit:RegisterEvent('spell0_10321', 1, 1)
end
if choix_sorts_10321 == 1 then
pUnit:RegisterEvent('spell1_10321', 1, 1)
end
if choix_sorts_10321 == 2 then
pUnit:RegisterEvent('spell2_10321', 1, 1)
end
if choix_sorts_10321 == 3 then
pUnit:RegisterEvent('spell3_10321', 1, 1)
end
end

function mob10321_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_10321', math.random(1500, 3000), 1)
end

function mob10321_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob10321_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob10321_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(10321, 1, 'mob10321_Action')
RegisterUnitEvent(10321, 2, 'mob10321_Leave')
RegisterUnitEvent(10321, 3, 'mob10321_Kill')
RegisterUnitEvent(10321, 4, 'mob10321_Die')
